package com.chinasofti.generic;

import com.chinasofti.optional.Student;

import java.util.ArrayList;
import java.util.List;

public class Demo1 {
    public static void main(String[] args) {
        List list = new ArrayList<>();
        list.add("123");
        list.add(123);
        list.add(new Student());
        Student s =(Student)list.get(0);
        s.getAge();

    }
}
